package com.edu.study.base.lmsOrderReturnReason.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.study.base.lmsOrderReturnReason.mapper.LmsOrderReturnReasonMapper;
import com.edu.study.base.lmsOrderReturnReason.domain.LmsOrderReturnReason;
import com.edu.study.base.lmsOrderReturnReason.service.ILmsOrderReturnReasonService;

/**
 * LmsOrderReturnReasonService业务层处理
 * 
 * @author zw
 * @date 2021-08-11
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class LmsOrderReturnReasonServiceImpl implements ILmsOrderReturnReasonService 
{
    @Autowired
    private LmsOrderReturnReasonMapper lmsOrderReturnReasonMapper;

    /**
     * 查询LmsOrderReturnReason
     * 
     * @param id LmsOrderReturnReasonID
     * @return LmsOrderReturnReason
     */
    @Override
    public LmsOrderReturnReason selectLmsOrderReturnReasonById(Long id)
    {
        return lmsOrderReturnReasonMapper.selectLmsOrderReturnReasonById(id);
    }

    /**
     * 查询LmsOrderReturnReason列表
     * 
     * @param lmsOrderReturnReason LmsOrderReturnReason
     * @return LmsOrderReturnReason
     */
    @Override
    public List<LmsOrderReturnReason> selectLmsOrderReturnReasonList(LmsOrderReturnReason lmsOrderReturnReason)
    {
        return lmsOrderReturnReasonMapper.selectLmsOrderReturnReasonList(lmsOrderReturnReason);
    }

    /**
     * 新增LmsOrderReturnReason
     * 
     * @param lmsOrderReturnReason LmsOrderReturnReason
     * @return 结果
     */
    @Override
    public int insertLmsOrderReturnReason(LmsOrderReturnReason lmsOrderReturnReason)
    {
        lmsOrderReturnReason.setCreateTime(DateUtils.getNowDate());
        return lmsOrderReturnReasonMapper.insertLmsOrderReturnReason(lmsOrderReturnReason);
    }

    /**
     * 修改LmsOrderReturnReason
     * 
     * @param lmsOrderReturnReason LmsOrderReturnReason
     * @return 结果
     */
    @Override
    public int updateLmsOrderReturnReason(LmsOrderReturnReason lmsOrderReturnReason)
    {
        return lmsOrderReturnReasonMapper.updateLmsOrderReturnReason(lmsOrderReturnReason);
    }

    /**
     * 批量删除LmsOrderReturnReason
     * 
     * @param ids 需要删除的LmsOrderReturnReasonID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderReturnReasonByIds(Long[] ids)
    {
        return lmsOrderReturnReasonMapper.deleteLmsOrderReturnReasonByIds(ids);
    }

    /**
     * 删除LmsOrderReturnReason信息
     * 
     * @param id LmsOrderReturnReasonID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderReturnReasonById(Long id)
    {
        return lmsOrderReturnReasonMapper.deleteLmsOrderReturnReasonById(id);
    }
}
